package com.oracle.coherence.patterns.security.accesscontrol;

import com.oracle.coherence.patterns.security.extend.CachePermission;
import com.oracle.coherence.patterns.security.extend.ExtendAccessController;
import com.oracle.coherence.patterns.security.extend.InvocationPermission;

import javax.security.auth.Subject;

/**
 * An implementation of a {@link ExtendAccessController}
 * that does no checking and allows all access.<p/>
 *
 * @author jonathan knight
 */
public class AllowAllExtendAccessController implements ExtendAccessController {

    public AllowAllExtendAccessController() {
    }

    /**
     * Overrides the super class method to do nothing.<p/>
     * This will allow all access checks to pass.<p/>
     *
     * @param permission - the requested permission
     * @param subject    - the Subject object representing the requestor
     */
    @Override
    public void checkPermission(CachePermission permission, Subject subject) {
    }

    /**
     * Overrides the super class method to do nothing.<p/>
     * This will allow all access checks to pass.<p/>
     *
     * @param permission - the requested permission
     * @param subject    - the Subject object representing the requestor
     */
    @Override
    public void checkPermission(InvocationPermission permission, Subject subject) {
    }
}